package com.resign.carl.command.example2.api.impl;

import com.resign.carl.command.example1.api.Command;
import com.resign.carl.command.example1.api.Light;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * Created by carl.zhao on 2016/6/15.
 */
@NoArgsConstructor
@AllArgsConstructor
public class LightOffCommand implements Command {

    private Light light;

    @Override
    public void execute() {
        light.off();;
    }

    @Override
    public void undo() {
        light.on();
    }
}
